package com.daocheng.dc.book.user.api;

import com.daocheng.dc.book.user.constant.ApiConstant;
import com.daocheng.dc.book.user.dto.req.FindByPhoneReqDTO;
import com.daocheng.dc.book.user.dto.req.RegisterUserReqDTO;
import com.daocheng.dc.book.user.dto.req.UpdatePasswordReqDTO;
import com.daocheng.dc.book.user.dto.rsp.FindByPhoneRspDTO;
import com.daocheng.framework.common.response.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @ClassName UserFeignApi
 * @author: 稻城
 * @date: 2025/3/31
 * @Version 1.0
 * @description: TODO
 */
@FeignClient(name = ApiConstant.SERVICE_NAME)
public interface UserFeignApi {
    String PREFIX = "/user";

    /**
      * @author 稻城
      * @Date 2025/3/31 15:35
      * @param registerUserReqDTO
      * @return Response<?>
      * @description 注册用户
      */
    @PostMapping(value = PREFIX + "/register")
    Response<Long> registerUser(@RequestBody RegisterUserReqDTO registerUserReqDTO);

    @PostMapping(value = PREFIX + "/findByPhone")
    Response<FindByPhoneRspDTO> findByPhone(@RequestBody FindByPhoneReqDTO findByPhoneReqDTO);
    @PostMapping(value = PREFIX + "/password/update")
    Response<?> updatePassword(@RequestBody UpdatePasswordReqDTO updatePasswordReqDTO);
}
